import {useEffect, useState} from "react";
import {getChannel} from "@/api/publish";

export const useChannel = () => {
    const [channelList, setChannelList] = useState([])
    useEffect(() => {
        const getDataList = async () => {
            const {data: { channels }} = await getChannel()
            setChannelList(channels)
        }
        getDataList()
    }, []);
    return { channelList }
}
